<template>
  <div class="app-main">
    <div class="app-main-item">
      <div class="app-main-left">
        <pieChart :num="data.preAssessmentNum" />
      </div>
      <div class="app-main-des">
        <span>{{ data.preAssessmentNum }}</span>
        <span>预评估</span>
      </div>
      <div class="app-main-num">{{ data.breakEarthquakeNum }}</div>
      <div class="app-main-txt">破坏地震</div>
    </div>
    <div class="app-main-item">
      <div class="app-main-right">
        <ResultChart :resultData="data" />
      </div>
      <div class="app-main-num"></div>
      <div class="app-main-txt">预评估结果的准确性</div>
    </div>
  </div>
</template>
<script setup name="Index">
import pieChart from './pieChart.vue'
import ResultChart from './ResultChart.vue'

const props = defineProps({
  data:{
    default: {},
    type: Object,
  }
})

const { data } = toRefs(props)

</script>
<style lang="scss" scoped>
.app-main {
  width: 100%;
  height: 210px;
  margin: 10px 10px 20px 6px;
  display: flex;
  justify-content: center !important;
  align-items: center;
  &-item {
    width: 210px;
    height: 200px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    //   background: red;
    background-image: url(/src/assets/images/disaterLosses/bg.png);
    background-size: 100% 100%;
    margin-right: 10px;
  }
  &-left{
    width: 140px;
    height: 140px;
    background-image: url(/src/assets/images/disaterLosses/bg_instrument.png);
    background-size: 100% 100%;
  }
  &-right{
    width: 200px;
    height: 140px;
    background-image: url(/src/assets/images/disaterLosses/bg_circle.png);
    background-size: 100% 100%;
  }
  &-num{
    width: 46px;
    height: 30px;
    font-size: 28px;
    font-family: Helvetica Neue LT Pro-65 Medium, Helvetica Neue LT Pro;
    font-weight: normal;
    color: #46FFFF;
    line-height: 0px;
  }
  &-des{
    position: absolute;
    top: 30%;
    left: 43%;
    display: flex;
    flex-direction: column;
    span:nth-child(1){
        width: 40px;
        height: 28px;
        font-size: 24px;
        font-family: Helvetica Neue LT Pro-55 Roman, Helvetica Neue LT Pro;
        font-weight: normal;
        color: #46FFFF;
        line-height: 30px;
    }
    span:nth-child(2){
        width: 42px;
        height: 14px;
        font-size: 14px;
        font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
        font-weight: normal;
        color: #FFFFFF;
        line-height: 14px;
    }
  }
  &-txt{
    width: 144px;
    height: 16px;
    font-size: 16px;
    text-align: center;
    font-family: Source Han Sans CN-Regular, Source Han Sans CN;
    font-weight: 400;
    color: #FFFFFF;
    line-height: 2px;
  }
}
</style>
